home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 March
/
PCWorld_2008-03_cd.bin
/
v cisle
/
mediacoder
/
MediaCoder-0.6.1.4045.exe
/
extensions
/
E900.7z
/
main.js
< prev
Wrap
Text File
|
2007-01-19
|
2KB
|
53 lines
/*************************************************************************
* MediaCoder extension - Creative ZEN transcoder
* Distributed under GPL license
* Copyright (c) 2005-06 Stanley Huang <reachme@citiz.net>
* All rights reserved.
*************************************************************************/
function ApplyParams()
{
var doc = NewXML("MediaCoderPref");
if (!doc) {
alert("Error creating config XML");
return;
}
var res = document.getElementById("res").value.split("x");
var format = document.getElementById("format").value;
switch (format) {
case "MPEG-1":
AddPrefNode(doc, "overall.container.format", "MPEG");
AddPrefNode(doc, "container.mpeg.format", "MPEG-1");
break;
case "MPEG-2":
AddPrefNode(doc, "overall.container.format", "MPEG");
AddPrefNode(doc, "container.mpeg.format", "MPEG-2");
break;
default:
AddPrefNode(doc, "overall.container.format", "Default");
}
AddPrefNode(doc, "overall.video.format", format);
AddPrefNode(doc, "overall.video.bitrate", document.getElementById("vb").value);
AddPrefNode(doc, "audioenc.lame.quality", document.getElementById("aq").value);
AddPrefNode(doc, "videoenc.xvid.gmc", "false");
AddPrefNode(doc, "videofilter.frame.enabled", "true");
AddPrefNode(doc, "videofilter.frame.nofpsinc", "true");
AddPrefNode(doc, "videofilter.frame.fps", document.getElementById("fps").value);
AddPrefNode(doc, "videofilter.frame.fpsScale", "1");
AddPrefNode(doc, "videofilter.scale.enabled", "true");
AddPrefNode(doc, "videofilter.scale.width", res[0]);
AddPrefNode(doc, "videofilter.scale.height", res[1]);
// post settings to MediaCoder
PostPrefXML(doc);
}
function Unload()
{
// stop playback
SendCommand("stop_play");
}